using System;
using System.Collections.Generic;
using UnityEngine;

namespace Gameplay.PVE.Data
{
    // <summary>
    /// rpg关卡结构
    /// </summary>
    public class RpgLevelData : ScriptableObject
    {
        
        public int levelId;
        public List<RpgStage> stages;

        public void Init()
        {
            stages = new List<RpgStage>();
        }
        
        [Serializable]
        public class RpgStage
        {
            public int stageId;
            public int stageType;
            public float stageParam;
            public int previousStageId;
            public List<RpgObstacle> obstacles;

            public List<Vector3> playerBirthPositions;
            public List<Vector3> enemyBirthPositions;
            public List<int> enemySpawnType;
            public List<float> enemySpawnParam;
            public List<int> enemyIds;
            public List<Vector3> attackPositions;
            public List<float> enemyHatredDistances;
           
        }
        
        [Serializable]
        public class RpgEnemy
        {
            public int id;
            public Vector3 position;
        }
        
        
        [Serializable]
        public class RpgObstacle
        {
            public int id;
            public int hp;
            public Vector3 position;
            public Vector3 rotation;
            public Vector3 scale;
            public int obstacleId;
            public List<Vector3> playerHidePoints;
            public List<Vector3> enemyHidePoints;
            public int width;
            public int height;
            public int breakId;
            public int spawnType;
            public float spawnParam;
        }
        
    }
}